const install = (Vue, vm) => {
	
	// 获取乡镇信息
	let getTownList = (params = {}) => vm.$u.get('/api/common/getTownList');
	
	// 获取社区信息
	let getCommunityList = (params = {}) => vm.$u.get('/api/common/getCommunityList');
	
	// 获取购社区信息(药人员)
	let getCommunityList2 = (params = {}) => vm.$u.get('/api/common/getCommunityList2', params);
	
	// 获取滚动公告
	let getPosterList = (params = {}) => vm.$u.get('/api/common/getPosterList');
	
	// 获取统计数据
	let getStatisticsList = (params = {}) => vm.$u.get('/api/common/getStatisticsList');
	
	// 获取轮播图
	let getSwiperList = (params = {}) => vm.$u.get('/api/common/getSwiperList');
	
	// 短信验证码请求
	let sendSms = (params = {}) => vm.$u.post('/api/common/sendSms', params);
	
	// 返沙人员信息填报
	let saveForm1 = (params = {}) => vm.$u.post('/api/index/form1', params);
	
	// 疫苗接种人员信息填报
	let saveForm2 = (params = {}) => vm.$u.post('/api/index/form2', params);
	
	// 购药人员自主填报
	let saveForm3 = (params = {}) => vm.$u.post('/api/index/form3', params);
	
	vm.$u.api = {
		getTownList,
		getCommunityList,
		getCommunityList2,
		getPosterList,
		getSwiperList,
		getStatisticsList,
		sendSms,
		saveForm1,
		saveForm2,
		saveForm3,
	};
}

export default {
	install
}